package com.zoweunion.mechanic.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;

/**
 * 优惠券用户关联表
 * 
 * @author xp
 * @email 17688825585@163.com
 * @date 2020-08-11 13:34:07
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder(toBuilder=true)
@TableName("t_s_ss_user_coupon")
public class UserCouponEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 
	 */
	@TableId(value = "id", type = IdType.AUTO)
	private Long id;
	/**
	 * 优惠券id
	 */
	private Long couponId;
	/**
	 * 用户id
	 */
	private String userId;
	/**
	 * 使用flag  1:未使用;2:已使用;3:赠送
	 */
	private Integer useFlag;
	/**
	 * 发放时间
	 */
	private Date grantTime;
	/**
	 * 优惠券来源 1:系统发放;2好友赠送
	 */
	private Integer couponSource;

	private Integer deleteFlag;
	/**
	 * 赠送人user_id
	 */
	private String giveUserId;
	/**
	 * 原始用户优惠券id
	 */
	private Long giveCouponId;
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date createTime;

	@TableField(exist = false)
	private String mobilePhone;

	@TableField(exist = false)
	private Integer giveFlag;
}
